<%-- 
 Document   : transition
 Created on : Nov 14, 2012, 1:32:18 PM
 Author     : user1
--%>

<%@ taglib uri="/struts-tags" prefix="s" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="${pageContext.request.contextPath}/Js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/Js/transition/transition.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/Js/transition/demo.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/Js/Implementation/implementation.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/Js/Usuario/adminUsers.js"></script>

        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/estilo.css" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/stylSergio.css" />

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Assign User</title>
    </head>
    
    <body>
        <div style="position: fixed; top: 0; z-index: 1; left:9%;">
            <s:div cssClass="divBlancoMenor"></s:div>
            <s:div cssClass="contenidoAzul">
                <jsp:include page="/jsp/encabezado.jsp" flush="true" />
                <jsp:include page="/jsp/menu.jsp" flush="true" />
                <s:div cssClass="divBlanco"></s:div>
            </s:div>
        </div>
        </br>
        </br>
        </br>
        </br>
        </br>
        </br>
        </br>
        <div align="center">
            <fieldset style="width: 80%; height: 100%">                                   
                <legend>Assign User</legend>  
                <br/>
                <br/>
                <s:form action="AdminUsers" >
                    <table style="width: 97%; margin-top: 3px;" rules="all" class="listado">
                        <thead>
                            <tr>         
                                <th style="width: 15px">KNKey</th>
                                <th style="width: 35px">Company Name</th>
                                <th style="width: 10px">Status Transition</th>
                                <th style="width: 10px">Status Implementation</th>
                                <th style="width: 15px">Creation</th>
                                <th style="width: 10px">Action</th>
                            </tr>
                        </thead>                              
                        <tbody>
                            <s:iterator value="listaTable" >
                                <tr>
                                    <td align="center"><s:property value="knkey" /></td>
                                    <td align="center"><s:property value="companyname" /></td>
                                    <td align="center"><s:property value="statusTrans" /></td>
                                    <td align="center"><s:property value="statusImple" /></td>
                                    <td align="center"><s:property value="creation" /></td>
                                    <td align="center">
                                        <s:a  id="%{knkey}" cssClass="buttonTablaAssign" method="DeleteRelationUserKnkey" >Delete
                                            <s:param name="idKnkey" value="knkey"></s:param>
                                            <s:param name="idUsuarioLike" value="idUsuario"></s:param>
                                        </s:a>
                                    </td> 
                                </tr>  
                            </s:iterator>
                        </tbody>                  
                    </table> 

                    <br/>
                    <br/>
                    <br/>

                    <s:div id="divCentrado">
                        <s:textarea style="margin: 1px;  resize: none;" name="newKnkeys" 
                                    class="textareas" id="txtKnkeys" value="%{newKnkeys}"   cols="28" rows="4" 
                                    onkeyup="this.value = this.value.replace(/[qwertyuiopasdfghjklzxcvbnm_~|!@#$%^&*()/+={}:.\s]/, '')">
                        </s:textarea>

                        <button type="button" onclick="refreshInfo(txtKnkeys.value);"  onmouseover="reloadmove();" onmouseout="reloadout()">
                            <div class="rfcsubs">Names</div>
                            <div class="botonActualizar">
                            </div>
                        </button>

                        <span class="errorAction">
                            <s:fielderror />
                        </span>

                        <s:textarea readonly="true" style="margin: 1px;  resize: none;" 
                                    class="textareas" id="txtCompany" name="txtCompanyNames"  cols="28" rows="4" >
                        </s:textarea>

                        &nbsp; &nbsp;
                        <script>
                            function enviarInfo(){
                                $("#sbtEnviarInfo").click();
                            }
                        </script>

                        <button id="btnConfirm" onclick="enviarInfo();" class="loginBoton" type="button"  > Confirm</button>
                        <s:submit cssClass="oculto" value="submit" id="sbtEnviarInfo"  method="AgregarNuevosKnkeysToUser"/>
                        <s:submit cssClass="oculto" value="submit" id="sbtRefreshInfo" action="AdminUsers"  method="MostrarCompanysName"/>

                    </s:div>
                </fieldset>
            </s:form>
        </div>
    </body>
</html>

